﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using H2.Streams;

namespace Mystery
{
    public partial class TransferStringsDialog : Form
    {
        public string MulgPath { get { return (string)cboMulg.SelectedItem; } }
        public string MpScnrPath { get { return (string)cboMpScnr.SelectedItem; } }

        public TransferStringsDialog()
        {
            InitializeComponent();
        }

        public void SetMulgTags(string[] paths)
        {
            cboMulg.Items.Clear();
            cboMulg.Items.AddRange(paths);
            int index = cboMulg.Items.IndexOf(MultiplayerGlobals.MultiplayerDataTagPath);
            if (index == -1) index = paths.Length - 1;
            cboMulg.SelectedIndex = index;
        }

        public void SetScnrTags(string[] paths)
        {
            cboMpScnr.Items.Clear();
            cboMpScnr.Items.AddRange(paths);
            int index = cboMpScnr.Items.IndexOf(Scenario.MultiplayerDataTagPath);
            if (index == -1) index = paths.Length - 1;
            cboMpScnr.SelectedIndex = index;
        }

        private void cmdCancel_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
        }

        private void cmdLink_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
        }

    }
}
